
<template>
  <div class="container">
    <div v-if='!errorCode'>
      <test-tip />
      <test-question />
      <test-selector />
    </div>
    <el-error v-else :errorCode='errorCode' />
  </div>
</template>
<script>
import TestTip from '@/components/Test/index.vue'
import TestQuestion from '@/components/Test/Question.vue'
import TestSelector from '@/components/Test/Selector.vue'
import { useStore } from 'vuex'
import { computed } from 'vue'
export default {
  name: 'indexpage',
  components: {
    TestTip,
    TestSelector,
    TestQuestion
  },
  setup() {
    const store = useStore()
    return {
      errorCode: computed(() => store.state.errorCode)
    }
  }
}
</script>
<style lang="less" scoped>
.container {
  width: 100%;
  height: 100%;
}
</style>
